<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>ActionDispatch::ExceptionWrapper</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/github.css" type="text/css" media="screen" />
<script src="../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>     
    <div class="banner">
        
            <span>Ruby on Rails v4.0.0</span><br />
        
        <h1>
            <span class="type">Class</span> 
            ActionDispatch::ExceptionWrapper 
            
                <span class="parent">&lt; 
                    
                    <a href="../Object.html">Object</a>
                    
                </span>
            
        </h1>
        <ul class="files">
            
            <li><a href="../../files/actionpack/lib/action_dispatch/middleware/exception_wrapper_rb.html">actionpack/lib/action_dispatch/middleware/exception_wrapper.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>A</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="ExceptionWrapper.html#method-i-application_trace">application_trace</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>F</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="ExceptionWrapper.html#method-i-framework_trace">framework_trace</a>,
              </li>
            
              
              <li>
                <a href="ExceptionWrapper.html#method-i-full_trace">full_trace</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>N</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="ExceptionWrapper.html#method-c-new">new</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>R</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="ExceptionWrapper.html#method-i-rescue_template">rescue_template</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>S</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="ExceptionWrapper.html#method-i-source_extract">source_extract</a>,
              </li>
            
              
              <li>
                <a href="ExceptionWrapper.html#method-i-status_code">status_code</a>,
              </li>
            
              
              <li>
                <a href="ExceptionWrapper.html#method-c-status_code_for_exception">status_code_for_exception</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    


    
      <!-- Section attributes -->
      <div class="sectiontitle">Attributes</div>
      <table border='0' cellpadding='5'>
        
          <tr valign='top'>
            <td class='attr-rw'>
              [R]
            </td>
            <td class='attr-name'>env</td>
            <td class='attr-desc'></td>
          </tr>
        
          <tr valign='top'>
            <td class='attr-rw'>
              [R]
            </td>
            <td class='attr-name'>exception</td>
            <td class='attr-desc'></td>
          </tr>
        
          <tr valign='top'>
            <td class='attr-rw'>
              [R]
            </td>
            <td class='attr-name'>file</td>
            <td class='attr-desc'></td>
          </tr>
        
          <tr valign='top'>
            <td class='attr-rw'>
              [R]
            </td>
            <td class='attr-name'>line_number</td>
            <td class='attr-desc'></td>
          </tr>
        
      </table>
    


    <!-- Methods -->
    
      <div class="sectiontitle">Class Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-c-new">
            
              <b>new</b>(env, exception)
            
            <a href="ExceptionWrapper.html#method-c-new" name="method-c-new" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-new_source')" id="l_method-c-new_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/f9ceefd3b9c3cea2460a89799156f2c532c4491c/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#L32" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-new_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 32</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">initialize</span>(<span class="ruby-identifier">env</span>, <span class="ruby-identifier">exception</span>)
  <span class="ruby-ivar">@env</span> = <span class="ruby-identifier">env</span>
  <span class="ruby-ivar">@exception</span> = <span class="ruby-identifier">original_exception</span>(<span class="ruby-identifier">exception</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-c-status_code_for_exception">
            
              <b>status_code_for_exception</b>(class_name)
            
            <a href="ExceptionWrapper.html#method-c-status_code_for_exception" name="method-c-status_code_for_exception" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-status_code_for_exception_source')" id="l_method-c-status_code_for_exception_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/f9ceefd3b9c3cea2460a89799156f2c532c4491c/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#L57" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-status_code_for_exception_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 57</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">status_code_for_exception</span>(<span class="ruby-identifier">class_name</span>)
  <span class="ruby-constant">Rack</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span>.<span class="ruby-identifier">status_code</span>(<span class="ruby-identifier">@@rescue_responses</span>[<span class="ruby-identifier">class_name</span>])
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                  
      <div class="sectiontitle">Instance Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-application_trace">
            
              <b>application_trace</b>()
            
            <a href="ExceptionWrapper.html#method-i-application_trace" name="method-i-application_trace" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-application_trace_source')" id="l_method-i-application_trace_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/f9ceefd3b9c3cea2460a89799156f2c532c4491c/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#L45" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-application_trace_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 45</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">application_trace</span>
  <span class="ruby-identifier">clean_backtrace</span>(<span class="ruby-value">:silent</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-framework_trace">
            
              <b>framework_trace</b>()
            
            <a href="ExceptionWrapper.html#method-i-framework_trace" name="method-i-framework_trace" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-framework_trace_source')" id="l_method-i-framework_trace_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/f9ceefd3b9c3cea2460a89799156f2c532c4491c/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#L49" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-framework_trace_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 49</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">framework_trace</span>
  <span class="ruby-identifier">clean_backtrace</span>(<span class="ruby-value">:noise</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-full_trace">
            
              <b>full_trace</b>()
            
            <a href="ExceptionWrapper.html#method-i-full_trace" name="method-i-full_trace" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-full_trace_source')" id="l_method-i-full_trace_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/f9ceefd3b9c3cea2460a89799156f2c532c4491c/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#L53" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-full_trace_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 53</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">full_trace</span>
  <span class="ruby-identifier">clean_backtrace</span>(<span class="ruby-value">:all</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-rescue_template">
            
              <b>rescue_template</b>()
            
            <a href="ExceptionWrapper.html#method-i-rescue_template" name="method-i-rescue_template" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-rescue_template_source')" id="l_method-i-rescue_template_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/f9ceefd3b9c3cea2460a89799156f2c532c4491c/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#L37" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-rescue_template_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 37</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">rescue_template</span>
  <span class="ruby-identifier">@@rescue_templates</span>[<span class="ruby-ivar">@exception</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>]
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-source_extract">
            
              <b>source_extract</b>()
            
            <a href="ExceptionWrapper.html#method-i-source_extract" name="method-i-source_extract" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-source_extract_source')" id="l_method-i-source_extract_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/f9ceefd3b9c3cea2460a89799156f2c532c4491c/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#L61" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-source_extract_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 61</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">source_extract</span>
  <span class="ruby-keyword">if</span> <span class="ruby-identifier">application_trace</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">trace</span> = <span class="ruby-identifier">application_trace</span>.<span class="ruby-identifier">first</span>
    <span class="ruby-identifier">file</span>, <span class="ruby-identifier">line</span>, <span class="ruby-identifier">_</span> = <span class="ruby-identifier">trace</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;:&quot;</span>)
    <span class="ruby-ivar">@file</span> = <span class="ruby-identifier">file</span>
    <span class="ruby-ivar">@line_number</span> = <span class="ruby-identifier">line</span>.<span class="ruby-identifier">to_i</span>
    <span class="ruby-identifier">source_fragment</span>(<span class="ruby-ivar">@file</span>, <span class="ruby-ivar">@line_number</span>)
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-status_code">
            
              <b>status_code</b>()
            
            <a href="ExceptionWrapper.html#method-i-status_code" name="method-i-status_code" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-status_code_source')" id="l_method-i-status_code_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/f9ceefd3b9c3cea2460a89799156f2c532c4491c/actionpack/lib/action_dispatch/middleware/exception_wrapper.rb#L41" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-status_code_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/action_dispatch/middleware/exception_wrapper.rb, line 41</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">status_code</span>
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">status_code_for_exception</span>(<span class="ruby-ivar">@exception</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">name</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                    </div>

    </div>
  </body>
</html>    